A 'Hot Potato' Gray Code for Permutations
نویسندگان
چکیده
We give the n! permutations of [n] = {1,2, . . . , n} a cyclic order inspired by the children’s game of Hot Potato. Our order is a transposition Gray code, meaning that consecutive permutations differ by a single transposition. Furthermore, each transposition is restricted in two ways: (1) It must transpose value n (the “hot potato”); (2) It must transpose positions that are circularly adjacent or semi-adjacent. In other words, if each permutation is written circularly, then our order repeatedly transposes the value n with a value that is one or two positions to its left or right.
منابع مشابه
Efficient generating algorithm for permutations with a fixed number of excedances
In this paper, we develop a constant amortized time (CAT) algorithm for generating permutations with a fixed number of excedances. We obtain a Gray code for permutations having one excedance. We also give a bijection between the set of n-length permutations with exactly one excedance and the set Sn(321, 2413, 3412, 21534)\{123 . . . (n− 1)n}. This induces a Gray code for the set Sn(321, 2413, 3...
متن کاملGray code for permutations with a fixed number of cycles
We give the first Gray code for the set of n-length permutations with a given number of cycles. In this code, each permutation is transformed into its successor by a product with a cycle of length three, which is optimal. If we represent each permutation by its transposition array then the obtained list still remains a Gray code and this allows us to construct a constant amortized time (CAT) al...
متن کاملGray code for permutations with a fixed number of left-to-right minima
In [1], the author provided a Gray code for the set of n-length permutations with a given number of left-to-right minima in inversion array representation. In this paper, we give the first Gray code for the set of n-length permutations with a given number of left-to-right minima in one-line representation. In this code, each permutation is transformed into its successor by a product with a tran...
متن کاملA Gray code for the shelling types of the boundary of a hypercube
We consider two shellings of the boundary of the hypercube equivalent if one can be transformed into the other by an isometry of the cube. We observe that a class of indecomposable permutations, bijectively equivalent to standard double occurrence words, may be used to encode one representative from each equivalence class of the shellings of the boundary of the hypercube. These permutations thu...
متن کاملRestricted compositions and permutations: From old to new Gray codes
Any Gray code for a set of combinatorial objects defines a total order relation on this set: x is less than y if and only if y occurs after x in the Gray code list. Let ≺ denote the order relation induced by the classical Gray code for the product set (the natural extension of the Binary Reflected Gray Code to k-ary tuples). The restriction of ≺ to the set of compositions and bounded compositio...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Electronic Notes in Discrete Mathematics
دوره 44 شماره
صفحات -
تاریخ انتشار 2013